if (import.meta.env.PROD == true) {
  console.log = function () { }
}



import { createApp } from 'vue';
import pinia from '/@/stores/index';
import App from './App.vue';
import router from './router';
import { directive } from '/@/directive/index';
import { i18n } from '/@/i18n/index';
import other from '/@/utils/other';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import '/@/theme/index.scss';
import VueGridLayout from 'vue-grid-layout';
import wtm from '/@/components/index'
import '../index.css'

import {  setupCustomComponents} from '/@/plugins/customComponents'

import { addCollection } from '@iconify/vue'
import parkIcons from '@iconify/json/json/icon-park.json'
import lineMdIcons from '@iconify/json/json/line-md.json'
import wiIcons from '@iconify/json/json/wi.json'
import { loadRuntimeConfig } from '/@/utils/configLoader';

// 注册图标
addCollection(parkIcons)
addCollection(lineMdIcons)
addCollection(wiIcons)

const app = createApp(App);
setupCustomComponents(app);
directive(app);
other.elSvg(app);


// 加载运行时配置
  app.config.globalProperties.$appConfig = loadRuntimeConfig();
  // 启动应用
  //app.mount('#app');
  app.use(pinia).use(router).use(ElementPlus).use(i18n).use(wtm).use(VueGridLayout).mount('#app');


